package com.mailanalyzer.utils;

import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;

public class IOUtils {

	public static synchronized String toString(InputStream stream){

		StringWriter writer = new StringWriter();
		try {
			org.apache.commons.io.IOUtils.copy(stream, writer, "UTF-8");
			return writer.toString();
		} 
		catch (IOException e) {e.printStackTrace();}
		
		return null;
		
	}
	
	
	
	
}
